package com.lab303.powerproject.repository;

import com.lab303.powerproject.entity.Temperature;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface TemperatureRepository extends JpaRepository<Temperature,Integer> {

    @Query(nativeQuery = true,value = "SELECT temperature.* FROM temperature WHERE DATE_FORMAT(temperature.time,'%m-%d %H')=?1")
    Temperature findTemperatureByDateTime(String MMddhh);


}
